<?php
/**
 * AJAX控制层
 * 
 * @copyright 	Copyright (c) 2011 thinkapk.com All rights reserved.
 * @package 	ThinkAPK_Action
 * @link 		http://www.thinkapk.com/
 * @author 		richie <richbossman@163.com>
 * @version 	$Id: AjaxAction.class.php 7482 2011-05-19 10:12:51Z richie $
 * 
 */
class AjaxAction extends ThinkAPK_Action_Web {
	
	//首页推荐
	function index_recommend(){
		$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
		$this->assign('recommend_app_list', D('Goods')->recommendApp($id));
		die($this->success($this->fetch('/common:index_recommend')));
	}
	
	//最新应用
	function new_apps(){
		$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
		$this->assign('new_app_list', D('Goods')->recommendApp($id, 10, array()));
		die($this->success($this->fetch('/common:new_app_list')));
	}
	
}
?>